import axios from 'axios'

export default function request(config) {
  const install = axios.create({
    baseURL: 'http://localhost:3000',
    timeOut: 5000
  })
  install.interceptors.request.use(res => {
    return res
  },err => {
    return err
  })
  install.interceptors.response.use(res => {
    return res.data
  },err => {
    return err
  })
  return install(config);
}